package com.gameplatform.util;

import java.io.IOException;
import java.io.InputStream;
import java.sql.Connection;
import java.sql.DriverManager;
import java.util.Properties;

public class MainTest {
    public static void main(String[] args) {
        InputStream resourceAsStream = MainTest.class.getClassLoader().getResourceAsStream("db.properties");
        Properties properties = new Properties();
        try {
            properties.load(resourceAsStream);
            Class.forName(properties.getProperty("driverClassName"));
            Connection connection = DriverManager.getConnection("jdbc:mysql://localhost:3306/game_platform", "root", "123456");
            System.out.println(connection);
        } catch (Exception e) {
            throw new RuntimeException(e);
        }
    }
}
